Skip to content

Conversation

@justinmk3
Copy link
Contributor

Problem:
If Toolkit fails to start, then Q will also fail to start:

2024-10-01 09:56:13.188 [error] aws.amazonq.refreshConnectionCallback: [
  [TypeError: Cannot read properties of undefined (reading 'getApi')
  at c:\…\dist\src\extensionNode.js:6093:284

Solution:
Check for undefined exports.

@justinmk3 justinmk3 requested review from a team as code owners October 4, 2024 22:08
@github-actions
Copy link

github-actions bot commented Oct 4, 2024

This pull request implements a feature or fix, so it must include a changelog entry. See CONTRIBUTING.md#changelog for instructions.

Problem:
If Toolkit fails to start, then Q will also fail to start:

    2024-10-01 09:56:13.188 [error] aws.amazonq.refreshConnectionCallback: [
      [TypeError: Cannot read properties of undefined (reading 'getApi')
      at c:\…\dist\src\extensionNode.js:6093:284

Solution:
Check for undefined `exports`.

await assertDoesNotThrow(async () => await fs.checkPerms(credentialsFilename, 'r--'))
await assertDoesNotThrow(async () => await fs.checkPerms(credentialsFilename, '-w-'))
await assert.doesNotReject(async () => await fs.checkPerms(credentialsFilename, 'r--'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these changes somehow related to this PR? Otherwise the change looks good to me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no just a fixup for a recent commit

@justinmk3 justinmk3 merged commit 37b6592 into aws:master Oct 7, 2024
9 of 10 checks passed
@justinmk3 justinmk3 deleted the fixnoapi branch October 7, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants